package com.example.streams;

import java.util.Optional;
import java.util.stream.Stream;

public class DebugStream {

    public static void main(String[] args) {
        Stream.of(100, 200, 300, 400, 500)
                .mapToLong(e -> e * 10)
                .filter(e -> e > 2000)
                .forEach(System.out::println);

        String str = Optional.of("hello,")
                .map(e -> e + "java,")
                .map(e -> e + "world").get();
        System.out.println(str);
    }
}
